package com.crm.jdy.service.drp;

import com.crm.jdy.common.dto.HWorkInfoDto;
import com.crm.jdy.common.mapper.FRecordInfoMapper;
import com.crm.jdy.common.pojo.HWorkInfo;
import com.crm.jdy.common.mapper.HWorkInfoMapper;
import com.crm.jdy.common.pojo.TeamInfo;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.apache.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**   
 * @Description:(考核表信息服务实现)
 *
 * @version: V1.0
 * @author: kong
 * 
 */
@Service(version = "${service.version}")
@Component
public class HWorkInfoServiceImpl  extends ServiceImpl<HWorkInfoMapper,HWorkInfo> implements HWorkInfoService  {

    @Autowired
    HWorkInfoMapper hWorkInfoMapper;

    @Override
    public PageInfo<HWorkInfo> seleteHWorkInfo(HWorkInfoDto wOutInfo) {
        PageHelper.startPage( wOutInfo.getCurrentPage(),wOutInfo.getPageSize());
        List<HWorkInfo> bookList = hWorkInfoMapper.seleteHWorkInfo(wOutInfo);
        PageInfo<HWorkInfo> pageInfo = new PageInfo<HWorkInfo>(bookList);
        return pageInfo;
    }

    @Override
    public boolean updateHWorkInfo(HWorkInfo wOutInfo) {
        return hWorkInfoMapper.updateById(wOutInfo) > 0;
    }

    @Override
    public boolean addHWorkInfo(HWorkInfo wOutInfo) {
        return hWorkInfoMapper.insert(wOutInfo) > 0;
    }

    @Override
    public boolean removeHWorkInfo(String workId) {
        return hWorkInfoMapper.deleteById(workId) > 0;
    }


}